/**
 * 默认公共配置文件
 */

'use strict';
const path = require('path');


module.exports = {

  // 系统默认路径配置
  default_app_root: path.resolve('./app'),
  default_controller_root: path.resolve('./app/controller'),
  default_locale_root: path.resolve('./app/locale'),
  default_view_root: path.resolve('./app/views'),
  default_static_root: path.resolve('./app/static'),
  default_mock_root: path.resolve('./app/mock'),

  //路由配置
  router:{    
    // 当直接访问域名时的默认路由
    default_path: '/',
    // 如果设置jump为false，则当直接访问域名时不重定向到default_path
    default_jump: false
  },
  //模板配置
  view:{
    nunjucks: {
      autoescape: true,
      throwOnUndefined: false,
      trimBlocks: false,
      lstripBlocks: false,
      watch: false,
      noCache: false
    },
    filters: {},
    globals: {},
    extensions: {},
    suffix: '.html'
  },

  //多语言配置
  i18n:{    
    updateFiles: true,
    locale:'en-us',
    locales:{
      'zh':'zh-cn',
      'zh-cn':'zh-cn',
      'zh-tw':'zh-tw',
      'zh-hk':'zh-hk',
      'en':'en-us',
    },
    fallbackToLanguage:true,
    cookieKey:'locale',
    queryKey:'lang'
  },

  // proxy配置
  proxy: {
    allowShowApi:false,    
    // 超时配置 
    timeout: 15000
  },
  api: {

  },
  //mock配置
  mock:{
    prefix:'/__MOCK__/'
  },

  extend: './config/server.json'
};
